#include  <stdio.h>
#include <stdlib.h>

//二叉树节点结构
typedef struct binaryTreeNode {
    int data;   //数据域
    struct binaryTreeNode * leftChild, * rightChild;    //左右孩子指针
}binaryTreeNode_t;

void createBinaryTree(binaryTreeNode_t * T){
    T->data = 1;
    T->leftChild = (binaryTreeNode_t *)malloc(sizeof(binaryTreeNode_t));
    T->leftChild->leftChild = NULL;
    T->leftChild->data = 2;
    T->leftChild->rightChild = NULL;
    T->rightChild = (binaryTreeNode_t *)malloc(sizeof(binaryTreeNode_t));
    T->rightChild->leftChild = NULL;
    T->rightChild->data = 3;
    T->rightChild->rightChild = NULL;
}

int main(int argc, char * argv[]) {
    binaryTreeNode_t * Tree;
    Tree = (binaryTreeNode_t *)malloc(sizeof(binaryTreeNode_t));
    createBinaryTree(Tree);
    printf("%d",Tree->leftChild->data);
    return 0;
}